Author |
Topic: Gamepad Emulator why not?
(Read 745 times) |
|
|
|
|
|
u_rebelscum
Full Member
Offline
Posts: 1028
You rebel scum
View
Profile | WWW | E-Mail |
|
Re:Gamepad Emulator why not?
« Reply #4 on: August 16, 2003, 12:43:44 AM » |
Reply
with quote |
So what exactly would be the point?
|
|
Many current windows games, especially sports games and games already ported to/from
consoles, assign player inputs by device, with the keyboard one device. Each
gamepad, joystick, ect, OTOH is it's own device. These games let control panels with
ipac, keywhiz, hagstom, MK64 (such as xarcade, hotrodse, and slikstik) only able to
control one player. (more info in the thread linked by allroy1975)
Howard, allroy1975 is asking if a key2joy prog could get around this limit by making
virtual joysticks from keyboard inputs, or is he stuck with either hacking gamepads or
only playing one player from a 2 player CP.
Allroy1975, I agree with howard that it would be very hard, especially with the keyboard
inputs. The keyboard and mouse are pretty much "protected" in windows so
that they "always" (
) work. Getting at the keyboard inputs and converting to joysticks' inputs will be
hampered, to say the least.
|
Robin
http://www.urebelscum.speedhost.com/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cobelli
Full Member
Offline
Posts: 21
I'm a llama!
View
Profile | E-Mail |
|
Re:Gamepad Emulator why not?
« Reply #20 on: August 27, 2003, 02:24:39 AM » |
Reply
with quote |
Well, I have been messing around with ppjoy (I don't really know why, I have no
interest right now as my arcade is not done, but I guess i just liked the challenge
) Anyway, A simple program already exists to take keyboard input and send it to ppjoy (it
is on the ppjoy page). It took a while to figure out how to configure, but i got it to
work, sort of. The problem is that the app does not intercept key commands. You have to be
on the application, press the key, then switch to the game and the key is registered.
Switch back to the app, press another key.. etc... I am hoping this is just an issue with
how winxp handles dos programs. I am going to try some more native environments. Will
report back.
-Cobelli |
|
|
|
|
|
|
|
|
cobelli
Full Member
Offline
Posts: 21
I'm a llama!
View
Profile | E-Mail |
|
Re:Gamepad Emulator why not?
« Reply #26 on: August 27, 2003, 11:03:42 PM » |
Reply
with quote |
JODY - first off, no nned to compile, the exe is included. Also, you are getting that
error because you do not have the ppjoy software installed and running.
Howard_castro - You are correct that it is difficult, but the hard part has already been
done for us. PPjoy is a program originally intended for controller hacks. Natively, it
accepts input over the lpt port and sends it out through directx. SO to windows, it looks
EXACTLY like a joystick. You can configure it in control panel, it has drivers to run it,
etc.. Tested with a few 3d apps and they all recognize it fine. The problem with the
software is that we aren't taking input over the lpt port, but rather the keyboard port.
However, this can be solved. PPjoy has a virtual mode in which it accepts ioctl calls. Now
all we need is a program that captures keystrokes and sends the output to ppjoy. As
previously stated, an example of such a program is available from ppjoy. Problem is that
it doesn't capture keys while in the background. It has to be the active program in order
to perform its task. Not good for gaming.
The solution: I have contacted the amazing author of ppjoy, and he is going to whip up the
necessary prog for us! YAY! However, I didn't want to push the envelope by asking for it
to be easy, so we may still need to do some work afterwards to make it user configurable. |
|
|
|
|
cobelli
Full Member
Offline
Posts: 21
I'm a llama!
View
Profile | E-Mail |
|
Re:Gamepad Emulator why not?
« Reply #28 on: August 28, 2003, 04:11:57 AM » |
Reply
with quote |
Deon (the author of ppjoy) came through! He is amazing! Wrote us a nice app that uses
the DIrectinput API to capture the keyboard strokes and pass them on to PPJoy. It's fully
configurable (not so easily, though, as you need the decimal value of the key) and in my
testing, works great. The one problem, though, is each instance of the prog only supports
1 joystick. A workaround is to just launch the app 4 times, but I emailed Deon about it
and hopefully he can add multiple joystick functionality to the program. UPDATE: In the
zip is a batch file that will run PPjoyKEY 4 times, each time specifying a different INI
file. Multi-joy support is too much more to ask from Deon. Hopefully, though, he will
figure out how to minimize the programs to the system tray, so there will be a little less
clutter. Thanks again, Deon, very cool. It took me a little figuring to get it working, so
I zipped up all the necessary files and included instructions
Enjoy! AND THANKS DEON!!!
---------------------------------------
Keyboard to Joystick emulation
First off, this would not be possible without the amazing work of Deon van der
Westhuysen. THANK YOU THANK YOU THANK YOU!
This procedure relies on two programs, both written by Deon. The first is PPjoy. This
application takes input over the lpt port and outputs it as a windows joystick. It can,
however, also be run in virtual mode in which it instead accepts input through ioctl
calls. Therefore, the second program is PPjoyKEY which takes keystrokes as input and
outputs to ppjoy through the aforementioned ioctl process.
Instructions:
1. Run the setup program in the PPjoy folder
2. Launch the PPjoy configurator
3. Click "add"
4. Select "virtual port" from the "parralel port" dropdown
5. Select the controller number from the controller number dropdown.
6. Click "add"
Repeat for each controller.
7. Run "key2joy.bat" from the main folder.
This is a little batch file I wrote that simply launches PPjoyKEY 4 times, each time
specifying a different INI file. I created the INI files to ease the installation
procedure. The keys are mapped as follows:
UP DOWN
LEFT RIGHT B1 B2 B3
B4 B5 B6 B7 B8
Joy1 1 2
3 4
5 6 7 8
9 0 - =
Joy2 q w
e r
t y u i
o p [ ]
Joy3 a s
d f
g h j
k l ; '
Joy4 z x
c v
b n m ,
. /
You can however specify your own configuration by using the decimal equivalent of the key
(ESC is 1 and the increase accross row).
Have fun!
- Mike Cobelli
-------------------------------------------------------------------------
Since it won't fit on the forum, You can get all the files from my website http://hostfreedom.com/key2joy.zip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|